package com.linwen.javase.desgin_pattern.BigTalkDesignPattenJAVACode._05工厂方法模式._1基本代码;

/**
 * @ClassName Test
 * @Description TODO
 * @Author zero
 * @DATE 2023/7/11 11:41 PM
 * @Version 1.0
 */
public class Test {
    public static void main(String[] args) {
        Creator[] creators = new Creator[2];
        creators[0] = new ConcreteCreatorA();
        creators[1] = new ConcreteCreatorB();

        for(Creator item : creators){
            Product product = item.factoryMethod();
            product.make();
        }

    }
}
